package com.cxz.study.loggerSlf4j;

import com.cxz.study.loggerApi.BizLogger;
import com.cxz.study.loggerApi.BizLoggerFactory;

/**
 * @className: Slf4jBizLoggerFactory
 * @author: ocxz1
 * @date: 2025/6/18 上午12:03
 * @Version: 1.0
 * @description: ddd-struct3
 */
public class Slf4jBizLoggerFactory implements BizLoggerFactory {
    @Override
    public BizLogger getLogger(Class<?> clazz) {
        return new Slf4jBizLogger(clazz);
    }

    @Override
    public BizLogger getLogger(Class<?> clazz, String category) {
        String loggerName = clazz.getName() + "." + (category == null ? "" : category);
        return new Slf4jBizLogger(loggerName);
    }
}
